/*
public class Person{

    private String name = "Person";

    int age=0;

}

public class Child extends Person{

    public String grade;

    public static void main(String[] args){

        Person p = new Child();

        System.out.println(( p.name);

    }

}*/
class Animal{
    public String name;
    public int age;

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void eat(){
        System.out.println(name + "正在吃");
    }
}
class Dog extends Animal{


    public Dog(String name, int age) {
        super(name, age);
    }
    @Override
    public void eat(){
        System.out.println(name + "正在吃狗粮");
    }

    public void bark(){
        System.out.println(name + "汪汪叫");
    }
}
public class Person {
    public static void main(String[] args) {
        Animal animal = new Dog("大黄",10);
        animal.eat();
    }
}